package com.wuyou.mybatishandlerdemo.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.wuyou.mybatishandlerdemo.entity.Statement;
import com.wuyou.mybatishandlerdemo.mapper.StatementMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * StatementController
 *
 * @Date 2025-09-25 14:17
 * @Author 无忧
 */
@RestController
@RequestMapping(value = "/statement")
public class StatementController {


    @Resource
    private StatementMapper statementMapper;


    @GetMapping
    public Object list(){
        int i= 222 / 0;
        return statementMapper.selectList(Wrappers.lambdaQuery());
    }
    @GetMapping(value = "/insert")
    public Object insert(){
        return statementMapper.insert(new Statement());
    }
}
